package com.cglib;

import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

/**
 * @author fanxiao  2022/4/8
 * @since 1.0.0
 */
public class Eoo1Visitor extends ClassVisitor {

	public Eoo1Visitor() {
		super(Opcodes.ASM8);
	}

	@Override
	public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
    	System.out.println(name + " extends " +superName + " {");
	}

	@Override
	public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
    	System.out.println(name);
		return null;
	}

	@Override
	public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) {
    	System.out.println(name);
		return null;
	}

	@Override
	public void visitEnd() {
    	System.out.println("}");
	}
}